import React from 'react';
import styles from './laundry_details.less';
import styles1 from './laundry_details.css';
import { getSessionData } from '../../../utils/localData'
import { NavBar, Icon, List } from 'antd-mobile';


const Item = List.Item;

export default class Laundry_details extends React.Component {

  render() {
    document.title = "商品"
    let shops = JSON.parse(getSessionData("shop-dd-shops"))
    let items = []
    shops.forEach((item,index)=> {
        items.push(
            <div key={index}  multipleLine onClick={() => {}}>
                <div className={styles.det_itenin}>

                <div className={styles.det_left}>
                        <img src={item.commodityImgUrl} className={styles.det_img} alt="" />
                        <div className={styles.det_leftt}>
                            <div>{item.commodityName}</div>
                            <div className={styles.det_txt2}><span className={styles.det_spes}>￥</span>{item.currentPrice}</div>
                        </div>
                </div>
                <div className={styles.det_one}>x{item.buyNum}</div>
                </div>
            </div>
        )


    });

    return (
      <div className={styles.det_all}>

            {/*<div className={styles1.det_one}>
              <NavBar
                mode="light"
                icon={<Icon type="left" onClick={() => { this.props.history.goBack() }} />}
                onLeftClick={() => console.log('onLeftClick')}>商品
              </NavBar>
            </div>*/}

           <div className={styles1.det_top}>
              <List className="my-list">

                {items}

              </List>
           </div>
    </div>


    )
  }


}
